package edu.sctu.xialei.May.day20150521one;

/**
 * Created by Administrator on 5/21/2015.
 */
public class PrinttingDatas {

    public void printTeacherDatas(TeacherData[] teachers) {

        for (int i = 0; i < teachers.length; i++) {

            System.out.print("\n\n\n   老师姓名：" + teachers[i].nameTeacher);
            System.out.print("   老师编号：" + teachers[i].numberTeacher);
            System.out.print("   老师职称：" + teachers[i].titleTeacher);
            System.out.print("   老师性别：" + teachers[i].sexTeacher);
            System.out.print("   老师课程：" + teachers[i].courseTeaching);

            System.out.println("\n\n   *老师所教学生信息*");
            for (int j = 0; j < teachers[i].students.length; j++) {
                System.out.print("\n");
                System.out.print("   学生姓名：" + teachers[i].students[j].nameStudent);
                System.out.print("   学生年龄：" + teachers[i].students[j].ageStudent);
                System.out.print("   学生成绩：" + teachers[i].students[j].gradeStudent);
                System.out.print("   学生学号：" + teachers[i].students[j].numberStudent);
                System.out.print("   学生地址：" + teachers[i].students[j].addressStudent);
                System.out.print("   学生性别：" + teachers[i].students[j].sexStudent);

            }
        }
    }



    public void pinttingStudentData(StudentData []students){
        for (int j = 0; j < students.length; j++) {
            System.out.print("\n");
            System.out.print("   学生姓名：" + students[j].nameStudent);
            System.out.print("   学生年龄：" + students[j].ageStudent);
            System.out.print("   学生成绩：" + students[j].gradeStudent);
            System.out.print("   学生学号：" + students[j].numberStudent);
            System.out.print("   学生地址：" + students[j].addressStudent);
            System.out.print("   学生性别：" + students[j].sexStudent);

        }

    }

    public void printtingMostCourseStudent(ReturnData returnData){

        System.out.println("\n   学生学习最多的课程是： " + returnData.courseName);
        System.out.println("   学生数目是： " + (returnData.stu.length) );
        System.out.println("   选学该门课程的学生有：   ");

        for (int i = 0; i < returnData.stu.length ; i++) {
            System.out.print("   " + returnData.stu[i].nameStudent + "   ");
        }

    }

}